package cn.wusifx.zabbix.request.builder.application;

import cn.wusifx.zabbix.request.BaseRequest;
import cn.wusifx.zabbix.request.builder.UpdateRequestBuilder;

import java.util.Map;

/**
 * https://www.zabbix.com/documentation/4.0/manual/api/reference/application/update
 */
public class ApplicationUpdateRequestBuilder extends UpdateRequestBuilder {
    private String applicationId;
    public ApplicationUpdateRequestBuilder(String auth) {
        super("application.update", auth);

    }
    public ApplicationUpdateRequestBuilder(Long id, String auth) {
        super("application.update", id, auth);
    }

    public String getApplicationId() {
        return applicationId;
    }

    public ApplicationUpdateRequestBuilder setApplicationId(String applicationId) {
        this.applicationId = applicationId;
        return this;
    }

    @Override
    public BaseRequest<Map<String, Object>> builder() {
        baseRequest.getParams().put("applicationid",applicationId);
        return baseRequest;
    }
}
